home *** CD-ROM | disk | FTP | other *** search
Wrap
VERSION 2.00 Begin Form frmMainForm BackColor = &H8000000F& BorderStyle = 1 'Fixed Single Caption = "TMS 'About' Demo" ClientHeight = 1572 ClientLeft = 4008 ClientTop = 3216 ClientWidth = 3972 Height = 2316 Icon = ABTMAIN.FRX:0000 Left = 3960 LinkTopic = "Form1" MaxButton = 0 'False ScaleHeight = 1572 ScaleWidth = 3972 Top = 2520 Width = 4068 Begin Label labDesignNote Alignment = 2 'Center AutoSize = -1 'True BackColor = &H00FF0000& BorderStyle = 1 'Fixed Single Caption = "This form is the 'launch' form for two (or is that three!) 'About' boxes each of which uses some techniques/APIs to do some neat stuff." FontBold = 0 'False FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 7.8 FontStrikethru = 0 'False FontUnderline = 0 'False ForeColor = &H0000FFFF& Height = 852 Left = 120 TabIndex = 1 Top = 600 Visible = 0 'False Width = 3732 WordWrap = -1 'True End Begin Label lblDummy Alignment = 2 'Center AutoSize = -1 'True BackStyle = 0 'Transparent BorderStyle = 1 'Fixed Single Caption = "Select 'Help', 'About...' For Demo and 'Help', 'Contents' for Explanation." FontBold = 0 'False FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 7.8 FontStrikethru = 0 'False FontUnderline = 0 'False Height = 408 Left = 120 TabIndex = 0 Top = 108 Width = 3732 WordWrap = -1 'True End Begin Menu mnuHelp Caption = "&Help" Begin Menu mnuHelpContents Caption = "&Contents" End Begin Menu mnuHelpSep1 Caption = "-" End Begin Menu mnuHelpAbout Caption = "&About TMS About Application..." End Begin Menu mnuHelpRealAbout Caption = "&Real 'About'..." End End '******************************************************************************* ' The Mandelbrot Set (International) Ltd. may be reached by the following means: ' CIS: 100016,2751 ' Internet 100016.2751@Compuserve.com ' FAX: (+44) 01451 860142. ' Telephone: (+44) 0941 117534. ' TMS accepts no liability whatsoever for this code or demonstration. '******************************************************************************* '========================================================== ' Module - ABTMAIN.FRM ' Module Prefix - None ' Author - Peter J. Morris. TMS Ltd. ' Date Written : #### Date - 16/11/94 Time - 03:11 ' Purpose - Example of how to use API for VBITS talk. ' Revisions ' BY WHY AFFECTED ' Peter J. Morris. TMS Ltd. Original code. '========================================================== Option Explicit '========================================================== ' Function - Form_Load ' Author - Peter J. Morris. TMS Ltd. ' Date Written: #### Date - 16/11/94 Time - 03:11 ' Purpose - See function purpose. ' Revisions: ' BY WHY AFFECTED ' Peter J. Morris. TMS Ltd. Original code. ' INPUTS - None ' OUTPUTS - None '========================================================== Private Sub Form_Load () '========================================================== ' Form: ABTMAIN.FRM Procedure: Form_Load ' Author - Peter J. Morris. TMS Ltd. ' Template fitted: #### Date - 16/11/94 Time - 03:11 ' Copyright and status if any: Copyright TMS 1994,1995 ' All rights reserved. Status @BLUE@TMS.DEMO@COLD ' Purpose/Description In brief: ' Simple form initialisation. '========================================================= ' Set up general error handler On Error GoTo Error_Form_Load: ' ========== Code Starts.========== Const sHelpFile = "HELP.HLP" ' Set some globals up. Init ' Center window in middle of screen. CenterWindow Me ' Make sure text fits in labels. DoLabels Me ' Set up help file path etc. If Right$(App.Path, 1) <> "\" Then App.HelpFile = App.Path & "\" & sHelpFile Else App.HelpFile = App.Path & sHelpFile End If ' ========== Code Ends .========== Exit Sub ' Error handler Error_Form_Load: ' Call general error handler ErrorHandler "ABTMAIN.FRM/Form_Load", Err, Error$ ' Default resume behaviour: exit this sub/func Resume Exit_Form_Load: Exit_Form_Load: End Sub '========================================================== ' Function - mnuHelpAbout_Click ' Author - Peter J. Morris. TMS Ltd. ' Date Written: #### Date - 16/11/94 Time - 03:11 ' Purpose - See function purpose. ' Revisions: ' BY WHY AFFECTED ' Peter J. Morris. TMS Ltd. Original code. ' INPUTS - None ' OUTPUTS - None '========================================================== Private Sub mnuHelpAbout_Click () '========================================================== ' Form: ABTMAIN.FRM Procedure: mnuHelpAbout_Click ' Author - Peter J. Morris. TMS Ltd. ' Template fitted: #### Date - 16/11/94 Time - 03:11 ' Copyright and status if any: Copyright TMS 1994,1995 ' All rights reserved. Status @BLUE@TMS.DEMO@COLD ' Purpose/Description In brief: ' Show 'first' about box in MS Word Style. '========================================================= ' Set up general error handler On Error GoTo Error_mnuHelpAbout_Click: ' ========== Code Starts.========== frmAboutBox.Show MODAL ' ========== Code Ends .========== Exit Sub ' Error handler Error_mnuHelpAbout_Click: ' Call general error handler ErrorHandler "ABTMAIN.FRM/mnuHelpAbout_Click", Err, Error$ ' Default resume behaviour: exit this sub/func Resume Exit_mnuHelpAbout_Click: Exit_mnuHelpAbout_Click: End Sub '========================================================== ' Function - mnuHelpContents_Click ' Author - Peter J. Morris. TMS Ltd. ' Date Written: #### Date - 16/11/94 Time - 03:11 ' Purpose - See function purpose. ' Revisions: ' BY WHY AFFECTED ' Peter J. Morris. TMS Ltd. Original code. ' INPUTS - None ' OUTPUTS - None '========================================================== Private Sub mnuHelpContents_Click () '========================================================== ' Form: ABTMAIN.FRM Procedure: mnuHelpContents_Click ' Author - Peter J. Morris. TMS Ltd. ' Template fitted: #### Date - 16/11/94 Time - 03:11 ' Copyright and status if any: Copyright TMS 1994,1995 ' All rights reserved. Status @BLUE@TMS.DEMO@COLD ' Purpose/Description In brief: ' Shows help file. '========================================================= ' Set up general error handler On Error GoTo Error_mnuHelpContents_Click: ' ========== Code Starts.========== ' Show help file. Const HELP_CONTENTS = &H3 ' Start help file. If WinHelp(Me.hWnd, App.HelpFile, HELP_CONTENTS, 0) = 0 Then MsgBox "WinHelp cannot start the help file for some reason!", MB_OK, "Error" End If ' ========== Code Ends .========== Exit Sub ' Error handler Error_mnuHelpContents_Click: ' Call general error handler ErrorHandler "ABTMAIN.FRM/mnuHelpContents_Click", Err, Error$ ' Default resume behaviour: exit this sub/func Resume Exit_mnuHelpContents_Click: Exit_mnuHelpContents_Click: End Sub '========================================================== ' Function - mnuHelpRealAbout_Click ' Author - Peter J. Morris. TMS Ltd. ' Date Written: #### Date - 16/11/94 Time - 03:11 ' Purpose - See function purpose. ' Revisions: ' BY WHY AFFECTED ' Peter J. Morris. TMS Ltd. Original code. ' INPUTS - None ' OUTPUTS - None '========================================================== Private Sub mnuHelpRealAbout_Click () '========================================================== ' Form: ABTMAIN.FRM Procedure: mnuHelpRealAbout_Click ' Author - Peter J. Morris. TMS Ltd. ' Template fitted: #### Date - 16/11/94 Time - 03:11 ' Copyright and status if any: Copyright TMS 1994,1995 ' All rights reserved. Status @BLUE@TMS.DEMO@COLD ' Purpose/Description In brief: ' Puts up 'real "About" box. '========================================================= ' Set up general error handler On Error GoTo Error_mnuHelpRealAbout_Click: ' ========== Code Starts.========== MsgBox "'About' was written by The Mandelbrot Set (Int'l) Ltd. for VBITS as a demonstration of how to access the Windows' API.", MB_OK Or MB_ICONINFORMATION, "About..." ' ========== Code Ends .========== Exit Sub ' Error handler Error_mnuHelpRealAbout_Click: ' Call general error handler ErrorHandler "ABTMAIN.FRM/mnuHelpRealAbout_Click", Err, Error$ ' Default resume behaviour: exit this sub/func Resume Exit_mnuHelpRealAbout_Click: Exit_mnuHelpRealAbout_Click: End Sub